import java.io.*;


public class Main {

	
	public static void main(String[] args) throws Exception {
		File file = new File("h:\\out.dat");
		FileOutputStream fos = new FileOutputStream(file);
		ObjectOutputStream oos = new ObjectOutputStream(fos);
		
		TeSerialiseren SchrijfMeWeg = new TeSerialiseren(true, 12, 3);
		oos.writeObject(SchrijfMeWeg);
		oos.close();
		
		FileInputStream fis = new FileInputStream(file);
		ObjectInputStream ois = new ObjectInputStream(fis);
		
		TeSerialiseren dto = (TeSerialiseren)ois.readObject();
		System.out.println("Data:"+dto.getBewaardGetal());
		ois.close();

	}

}
